package org.jiajie.designpatterndemo.command.lxf;

/**
 * 为了支持CopyCommand和PasteCommand这两个命令，我们从Command
 * @author jay
 */
public class CopyCommand implements Command {
    /**
     * 持有执行者对象
     */
    private TextEditor receiver;

    public CopyCommand(TextEditor receiver) {
        this.receiver = receiver;
    }

    @Override
    public void execute() {
        receiver.copy();
    }
}
